<template>
  <div>
    御剑乘风来,除魔天地间!====home
    <img :src="$store.state.userInfo.logo" alt="" />

    <ul>
      <li v-for="item in $store.state.goods.goods" :key="item.id">
        <p>id:{{ item.id }}</p>
        <p>名称:{{ item.goods_name }}</p>
        <p>价格:{{ item.price }}</p>
        <button @click="del(item.id)">删除</button>
      </li>
    </ul>
  </div>
</template>
           
<script>
export default {
  name: '',
  data() {
    return {}
  },
  created() {},
  computed: {},
  methods: {
    del(id) {
      //  触发mutatiosns中的函数实现删除数据
      this.$store.commit('goods/mDel', id)
    },

    
  },
}
</script>
<style lang='less'  scoped>
img {
  width: 100px;
  height: 100px;
}
</style>